home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / MUSIC / @FALCON / MGPL-115 / AMIGA / USE-DSP.S < prev    next >
Encoding:
Text File  |  1995-08-31  |  5.3 KB  |  215 lines

  1. ***********************************************************************
  2. ***********                                        ***********
  3. ***********                                        ***********
  4. ***********      De l'utilisation du Replay DSP Amiga        ***********
  5. ***********                                        ***********
  6. ***********        Of Use of the Amiga DSP-Replay        ***********
  7. ***********                                        ***********
  8. ***********                                        ***********
  9. ***********          By Simplet / FATAL DESIGN            ***********
  10. ***********                                        ***********
  11. ***********************************************************************
  12.  
  13.             OutPut    USE-DSP.TOS
  14.             OPT        O+,OW-
  15.  
  16. ***********************************************************************
  17. ***********                Inits TOS                    ***********
  18. ***********************************************************************
  19.  
  20.         Section    TEXT
  21.  
  22. Start_Up    movea.l    4(sp),a5                ; BasePage Adress - Prg
  23.         lea.l    Stack,sp                ; Nouvelle Pile
  24.         movea.l    12(a5),a0                ; Text
  25.         adda.l    20(a5),a0                ; + Data
  26.         adda.l    28(a5),a0                ; + BSS
  27.         adda.w    #256,a0                ; + BasePage
  28.         pea.l    (a0)                    ; Length
  29.         pea.l    (a5)                    ; Adress
  30.         pea.l    $4a0000                ; 0 + Mshrink
  31.         trap        #1                    ; Gemdos
  32.         lea.l    12(sp),sp
  33.  
  34. ***********************************************************************
  35. ***********                It begins here                ***********
  36. ***********************************************************************
  37.  
  38.         lea.l    Msg_Rout(pc),a0
  39.         bsr        Print
  40.  
  41.         lea.l    Module(pc),a0
  42.         lea.l    WorkSpace,a1
  43.         bsr        MGTK_Init_Module_Samples
  44.  
  45.         lea.l    Error_Memory(pc),a0
  46.         tst.w    d0
  47.         bmi        Error
  48.  
  49.         bsr        MGTK_Init_DSP
  50.  
  51.         lea.l    Error_DSP(pc),a0
  52.         tst.w    d0
  53.         bmi        Error
  54.  
  55.         lea.l    Msg_Ok,a0
  56.         bsr        Print
  57.  
  58.         bsr        MGTK_Save_Sound
  59.         bsr        MGTK_Init_Sound
  60.  
  61.         moveq.l    #1,d0                ; 49.17 KHz
  62.         bsr        MGTK_Set_Replay_Frequency
  63.         
  64.         st        MGTK_Restart_Loop        ; Loop On
  65.         bsr        MGTK_Play_Music
  66.  
  67. ***********************************************************************
  68. ***********            Main Waiting Loop                ***********
  69. ***********************************************************************
  70.  
  71. Main_Loop    move.w    #11,-(sp)                ; Cconis
  72.         trap        #1                    ; Gemdos
  73.         addq.l    #2,sp
  74.         tst.b    d0
  75.         beq.s    Main_Loop
  76.  
  77.         move.w    #7,-(sp)                ; Crawin
  78.         trap        #1                    ; Gemdos
  79.         addq.l    #2,sp
  80.  
  81.         cmp.b    #' ',d0
  82.         beq.s    Quit
  83.  
  84.         cmp.b    #'/',d0
  85.         bne.s    No_PF
  86.  
  87.         move.w    MGTK_Frequency_Divider,d0
  88.         subq.w    #1,d0
  89.         beq.s    Main_Loop
  90.  
  91.         bsr        MGTK_Set_Replay_Frequency
  92.         bra.s    Main_Loop
  93.  
  94. No_PF    cmp.b    #'*',d0
  95.         bne.s    No_NF
  96.  
  97.         move.w    MGTK_Frequency_Divider,d0
  98.         addq.w    #1,d0
  99.         cmp.w    #4,d0
  100.         beq.s    Main_Loop
  101.  
  102.         bsr        MGTK_Set_Replay_Frequency
  103.         bra.s    Main_Loop
  104.  
  105. No_NF    cmp.b    #'-',d0
  106.         bne.s    No_PP
  107.  
  108.         bsr        MGTK_Previous_Position
  109.         bra.s    Main_Loop
  110.  
  111. No_PP    cmp.b    #'+',d0
  112.         bne.s    No_NP
  113.  
  114.         bsr        MGTK_Next_Position
  115.         bra.s    Main_Loop
  116.  
  117. No_NP
  118.         bclr        #5,d0        ; Upper-Case
  119.  
  120.         cmp.b    #'L',d0
  121.         bne.s    No_Play
  122.  
  123.         moveq.l    #1,d0
  124.         bsr.s    MGTK_Play_Music
  125.         bra.s    Main_Loop
  126.  
  127. No_Play    cmp.b    #'S',d0
  128.         bne.s    No_Stop
  129.  
  130.         bsr        MGTK_Stop_Music
  131.         bra.s    Main_Loop
  132.  
  133. No_Stop    cmp.b    #'P',d0
  134.         bne        Main_Loop
  135.  
  136.         bsr        MGTK_Pause_Music
  137.         bra        Main_Loop
  138.  
  139. ***********************************************************************
  140. ***********        It's Finished, Restore All            ***********
  141. ***********************************************************************
  142.  
  143. Quit        bsr        MGTK_Stop_Music
  144.         bsr        MGTK_Restore_Sound
  145.  
  146. Exit        clr.w     -(sp)                    ; PTerm
  147.         trap     #1                        ; Gemdos
  148.  
  149. Error    bsr.s    Print
  150.  
  151.         move.w    #7,-(sp)
  152.         trap        #1
  153.         addq.l    #2,sp
  154.  
  155.         clr.w     -(sp)                    ; PTerm
  156.         trap     #1                        ; Gemdos
  157.  
  158. ***********************************************************************
  159. ***********                Sub-Routines                ***********
  160. ***********************************************************************
  161.  
  162. Print    pea.l    (a0)
  163.         move.w    #9,-(sp)            ; Cconws
  164.         trap        #1                ; GemDos
  165.         addq.l    #6,sp
  166.         rts
  167.  
  168.         Section    BSS
  169.  
  170.         ds.l        20832/4                ; WorkSpace, Maxi 20832 octets
  171. WorkSpace    ds.l        1                    ; first of the BSS section
  172.  
  173.         Include    'AMIGADSP.S'
  174.  
  175. ***********************************************************************
  176. ***********                The Module                ***********
  177. ***********************************************************************
  178.  
  179.         Section    DATA
  180.  
  181. Msg_Rout    dc.b        27,'E'
  182.         dc.b        "Amiga 4/6/8 voices & xxCH DSP-Replay Routine by Simplet / FATAL DESIGN",13,10
  183.         dc.b        "----------------------------------------------------------------------",13,10,10
  184.         dc.b        "The CPU-Time taken is appearing in Pink.",13,10
  185.         dc.b        "The Grey corresponds to the patterns management.",13,10
  186.         dc.b        "You can use the following keys :",13,10
  187.         dc.b        "  - or + for previous or next music position",13,10
  188.         dc.b        "  / or * for previous or next replay frequency",13,10
  189.         dc.b        "  L for play, P for pause, S for stop",13,10
  190.         dc.b        "  Space to quit",13,10,10
  191.         dc.b        "Initialisating Samples.......",0
  192.  
  193. Msg_Ok    dc.b        "Ok..",13,10,0
  194.  
  195. Error_DSP    dc.b        7,13,10
  196.         dc.b        "Error, the DSP program couldn't be loaded.",13,10
  197.         dc.b        "Press any key...",0
  198. Error_Memory
  199.         dc.b        7,13,10
  200.         dc.b        "Error, the workspace isn't big enough.",13,10
  201.         dc.b        "Press any key...",0
  202.  
  203.         Even
  204.         IncDir    'E:\SNDTRACK\DEPACK\'
  205. Module    IncBin    'GUITAR-S.MOD'        ; last of the DATA section
  206.  
  207. ***********************************************************************
  208. ***********                BSS Section                ***********
  209. ***********************************************************************
  210.  
  211.         Section    BSS
  212.  
  213. End_Stack    ds.l        64
  214. Stack    ds.l        1
  215.